Conversation
|
|
||
| # Install the PHP extensions we need, and other packages | ||
| RUN apt-get update \ | ||
| RUN set -ex \ |
There was a problem hiding this comment.
Prefixing all the run statements with set -ex for easier debugging, as is used in some other repos
| && pecl install memcached \ | ||
| # Memcached 2.2.0 is the latest for PHP < 7 | ||
| # see https://pecl.php.net/package/memcached | ||
| && pecl install memcached-2.2.0 \ |
There was a problem hiding this comment.
Choosing not to bump the base image up to PHP 7, so I have to be more specific here
| && docker-php-ext-enable memcached \ | ||
| # Set recommended PHP.ini settings | ||
| # See https://secure.php.net/manual/en/opcache.installation.php | ||
| && { \ |
There was a problem hiding this comment.
Just joining this with the previous run statement for one less layer
| -once \ | ||
| -dedup \ | ||
| -consul ${CONSUL}:8500 \ | ||
| -consul-addr ${CONSUL}:8500 \ |
There was a problem hiding this comment.
The latest version of consul-template was throwing warnings/notices about the change to the argument
| - 127.0.0.1 | ||
| labels: | ||
| - triton.cns.services=consul | ||
| - triton.cns.services=wp-consul |
There was a problem hiding this comment.
This is a breaking change for upgrades from previous versions of this project, but we've discovered that namespacing Consul is critical for supporting multiple projects in a single DC
docker-compose.yml
Outdated
| - CONSUL_AGENT=1 | ||
| labels: | ||
| - triton.cns.services=nginx | ||
| - triton.cns.services=wp-nginx, nginx |
There was a problem hiding this comment.
Though I chose to make a breaking change elsewhere, I'm preserving the un-namespaced nginx here because I can't change my Bitly link
| "poll": 7, | ||
| "onChange": "/usr/local/bin/onchange-db.sh" | ||
| }, | ||
| { |
There was a problem hiding this comment.
We should have been tracking this all along.
Currently there's a race condition while doing rolling updates of MySQL. If the new mysql-primary becomes healthy after all changes to the mysql services change, then WordPress won't recognize it. This is intended to fix that.
|
|
||
| echo '# Consul discovery via Triton CNS' >> _env | ||
| echo CONSUL=consul.svc.${TRITON_ACCOUNT}.${TRITON_DC}.cns.joyent.com >> _env | ||
| echo CONSUL=wp-consul.svc.${TRITON_ACCOUNT}.${TRITON_DC}.cns.joyent.com >> _env |
There was a problem hiding this comment.
Applying the new namespacing here
| - CONSUL_AGENT=1 | ||
| labels: | ||
| - triton.cns.services=nginx | ||
| - triton.cns.services=wp-nginx,nginx |
There was a problem hiding this comment.
Though I chose to make a breaking change elsewhere, I'm preserving the un-namespaced nginx here because I can't change my Bitly link
|
LGTM |
...and many other updates as needed. See inline comments for more details.